#ifndef INET_SOCKET_STREAM_H
#define INET_SOCKET_STREAM_H

#include "Socket.h"

#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>
#include <string>
#include <iostream>

class SocketStream
{
 public:
  SocketStream();
  SocketStream(Socket h);
  ~SocketStream();

  Socket getHandle() const;
  void setHandle(Socket h);

  //ssize_t recv(void * buf, size_t len, int flags);
  //ssize_t send(const void * buf, size_t len, int flags);

  std::string recv() const;
  void send(const std::string  &str);

  
 private:
  Socket handle_;
};

#endif


